package com.zhuanzhuan.hero.user.enums;

import lombok.Getter;

/**
 * @ClassName ExceptionMsgEnum
 * @Description
 * @Author hanjunjun
 * @Date 2024/6/17 20:51
 */
@Getter
public enum ExceptionMsgEnum {

    PARAM_ERROR(100, "参数错误"),

    /**
     * 逻辑处理异常，重试
     */
    BUSINESS_ERROR(600, "处理失败，请稍后重试"),
    DUPLICATE_REQUEST(601, "重复操作"),

    COMMON_ERROR(-1, "网络异常，请稍后重试"),

    LOGIN_ERROR(401, "未登录"),
    REGISTER_FAIL(4001, "登录失败，请重试"),
    DATA_NOT_EXIST(4004, "数据不存在"),

    CAN_NOT_EDIT(5001, "您的会员已过期/退出/被清退，无法操作"),
    VERFICATION_CODE_ERROR(5002, "验证码错误，请重新填写"),
    DEFAULT_PAYMENT_TYPE_ERROR(5003, "必须设置一个默认收款方式")
    ;

    private final Integer code;

    private final String errorMsg;

    ExceptionMsgEnum(Integer code, String errorMsg) {
        this.code = code;
        this.errorMsg = errorMsg;
    }

}
